package com.beiming.libra.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


import javax.persistence.*;

@Table(name = "arbitration_case_proof")
@ApiModel("举证质证参数")
@Data
public class ArbitrationCaseProof extends  BaseObject {

  /**
   * 仲裁申请表id
   */
  @Column(name = "case_id")
  @ApiModelProperty(value = "仲裁申请表id", required = true, hidden = false)
  private String caseId;

  /**
   * 真实性
   */
  @ApiModelProperty(value = "真实性", required = false, hidden = false)
  private String realness;

  /**
   * 合法性
   */
  @ApiModelProperty(value = "合法性", required = false, hidden = false)
  private String legality;

  /**
   * 关联性
   */
  @ApiModelProperty(value = "关联性", required = false, hidden = false)
  private String relation;

  /**
   * 原因
   */
  @ApiModelProperty(value = "原因", required = false, hidden = false)
  @Column(name = "reason")
  private String reason;

  /**
   * 举证人id
   */
  @ApiModelProperty(value = "举证人id", required = false, hidden = false)
  @Column(name = "proof_person_id")
  private String proofPersonId;

  /**
   *  举证人案件角色编码
   */
  @Column(name = "user_type")
  @ApiModelProperty(value = "举证人案件角色编码", required = false, hidden = false)
  private String userType;

  /**
   *  举证人案件角色名称
   */
  @Column(name = "user_type_name")
  @ApiModelProperty(value = "举证人案件角色名称", required = false, hidden = false)
  private String userTypeName;

  public static String getProofStatus(String statusCode) {
    if ("5".equals(statusCode)) {
      //状态值为5查询所有数据
      //默认将审核通过数据加入有效数据中
      statusCode = null;
    }
    return statusCode;
  };

  public static String getCheckStatus(String statusCode) {
    if ("1".equals(statusCode)) {
      statusCode = "4";
    } else {
      statusCode = "3";
    }
    return statusCode;
  };
}
